{% extends 'window.twig' %}
{% block body %}
    <div class="admin-main-container">
        <div class="clearfix btn-control" style="padding: 10px 0 0">
            <form action="task.temp.list" method="get" id="frmSearch">
                <div class="col-xs-8 form-inline">
                    <div class="input-group col-xs-4">
                        <div class="input-group-addon">任务状态</div>
                        <select class="form-control" name='taskStatus'>
                            <option value="-1">所有</option>
                            <option value="1">咨询</option>
                            <option value="2">缴费</option>
                            <option value="3">完成</option>
                        </select>
                    </div>
                    <div class="input-group form-inline" style="width: 310px;">
                        <div class="input-group-addon">创建时间</div>
                        <input class="datetime form-control" type="text" class="form-control" name="start_date" style="width: 100px;"
                               date-max="#F{$dp.$D('search_date_end')||'%y-%M-%d'}" id="search_date_start" />
                        <div class="input-group-addon" style="border-left: none;border-right: none;">-</div>
                        <input class="datetime form-control" type="text" class="form-control" name="end_date" style="width: 100px;"
                               date-min="#F{$dp.$D('search_date_start')}" date-max="%y-%M-%d" id="search_date_end"/>
                    </div>
                </div>

                <!-- 高级搜索 -->
                <div class="search-form  col-xs-4 text-right">
                    <div class="input-group">
                        <input type="text" name="search_key" class="search-input form-control" value=""
                               placeholder="任务关键字">
                <span class="input-group-btn">
                    <button class="btn btn-default" type="submit" id="search"><i
                                class="glyphicon glyphicon-search"></i></button></span>
                    </div>
                </div>
            </form>
        </div>
        <div id="ajax_block" load-model="ajax">
            {% include 'task/list_tmp_block.twig' %}
        </div>
    </div>
{% endblock %}
{% block script %}
    <script type="text/javascript">
        $(function(){
            location.href='#_r_b';
            $('#frmSearch').submit(function(){
                var url = $(this).attr('action');
                url += "?" + $(this).serialize();
                $('#ajax_block').ajaxLoadByPage(url);
                return false;
            });
            util.resize(window,1050);
        });
    </script>
{% endblock %}